﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UIT.Commands
{
    public class Cut : ICommand
    {

        public CommandType CommandType
        {
            get { return CommandType.Undoable; }
        }

        private object myTarget;
        private Delete deleteCommand = new Delete();
        private Copy copyCommand = new Copy();

        public void Execute(object target, params object[] parameters)
        {
            this.myTarget = target;

            Redo();
        }

        public void Redo()
        {
            copyCommand.Execute(this.myTarget, null);
            deleteCommand.Execute(this.myTarget, null);
        }

        public void Undo()
        {
            deleteCommand.Undo();
        }

    }
}
